<template>
	<view class="classLayout pageBg">
		<custom-nav-bar  title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :key="item._id" :item="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
import {ref} from 'vue';
import {onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app";
import {apiGetClassify} from "@/api/apis.js";

//专题精选
const classifyList = ref([])
const getClassify = async() =>{
	
	let res = await apiGetClassify({
		//select:true		
		pageSize:20
	});
	classifyList.value = res.data;
}
getClassify();


//分享给好友
onShareAppMessage((e)=>{
	
	return{
		title:"图库",
		path:"/pages/classify/classify"
	}
	
})

//分享到朋友圈
onShareTimeline(()=>{
	
	return{
		title:"图库",
		//imageUrl:'xxx'
	}
	
})

	
</script>

<style lang="scss" scoped>

.classify{
	
	padding: 30rpx;
	
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap:15rpx;
	
}
       
</style>  
